﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace ITTestingSystem.Domain.Entities
{
    /// <summary>
    /// Specifies the tests entity
    /// </summary>
    /// 
    public class Test
    {
        /// <summary>
        /// Returns the unique identifier of the test in the database
        /// </summary>
        /// 
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// Returns the title of the test
        /// </summary>
        /// 
        [Required]
        public string Title { get; set; }

        /// <summary>
        /// Returns the unique identifier of the tests category
        /// </summary>
        /// 
        [Required]
        public int CategoryId { get; set; }




        /// <summary>
        /// Returns the category of the test
        /// </summary>
        /// 
        public virtual Category Category { get; set; }

        /// <summary>
        /// Returns the descriptions information about the test
        /// </summary>
        /// 
        [Required]
        public virtual TestsDescription TestsDescription { get; set; }

        /// <summary>
        /// Returns the statistics information about the test
        /// </summary>
        /// 
        [Required]
        public virtual TestsStatistic TestsStatistic { get; set; }

        /// <summary>
        /// Returns all questions in the test
        /// </summary>
        /// 
        public virtual ICollection<Question> Questions { get; set; }

        /// <summary>
        /// Returns information about completing this test by different users
        /// </summary>
        /// 
        public virtual ICollection<CompletedTestsDetail> CompletedTestsDetails { get; set; }
    }
}
